import request from '/@/utils/request';


// 设备管理
export const getDeviceGroupListPage = (params: any) => {
    return request(
        {
            url: '/api/Device/GroupList',
            method: 'get',
           params,
        }
    )
};
export const getDeviceGroupDeatil = (params: any) => {
    return request(
        {
            url: '/api/Device/GroupDetail',
            method: 'get',
           params,
        }
    )
};
export const editDeviceGroup = (params: any) => {
    return request(
        {
            url: '/api/Device/GroupUpdate',
            method: 'post',
            data: params
        }
    )
};
export const removeDeviceGroup = (params: any) => {
    return request(
        {
            url: '/api/Device/GroupDelete',
            method: 'delete',
            params: params
        }
    )
};
export const getDeviceGroupAll = (params: any) => {
    return request(
        {
            url: '/api/DeviceData/GroupListAll',
            method: 'get',
           params,
        }
    )
};
export const getDeviceList = (params: any) => {
    return request(
        {
            url: '/api/Device/getList',
            method: 'get',
           params,
        }
    )
};
export const getDeviceDeatil = (params: any) => {
    return request(
        {
            url: '/api/Device/Get',
            method: 'get',
           params,
        }
    )
};
export const editDevice = (params: any) => {
    return request(
        {
            url: '/api/Device/Update',
            method: 'post',
            data: params
        }
    )
};
export const removeDevice = (params: any) => {
    return request(
        {
            url: '/api/Device/Delete',
            method: 'delete',
            params: params
        }
    )
};

export const getDrivers = (params: any) => {
    return request(
        {
            url: '/api/Driver/GetDrivers',
            method: 'get',
           params,
        }
    )
};

export const getDeviceAll = (params: any) => {
    return request(
        {
            url: '/api/DeviceData/AllDevice',
            method: 'get',
            params,
        }
    )
};


export const getDeviceConfigList = (params: any) => {
    return request(
        {
            url: '/api/DeviceConfig/GetList',
            method: 'get',
            params,
        }
    )
};
export const getDeviceConfig = (params: any) => {
    return request(
        {
            url: '/api/DeviceConfig/Get',
            method: 'get',
           params,
        }
    )
};
export const editDeviceConfig = (params: any) => {
    return request(
        {
            url: '/api/DeviceConfig/Update',
            method: 'post',
            data: params
        }
    )
};
export const removeDeviceConfig = (params: any) => {
    return request(
        {
            url: '/api/DeviceConfig/Delete',
            method: 'delete',
            params: params
        }
    )
};

export const getDeviceGroupTree = (params: any) => {
    return request(
        {
            url: '/api/DeviceData/GetDeviceGroupTree',
            method: 'get',
            params,
        }
    )
};


export const getDeviceVariableList = (params: any) => {
    return request(
        {
            url: '/api/DeviceVariable/GetList',
            method: 'get',
            params,
        }
    )
};
export const getDeviceVariable = (params: any) => {
    return request(
        {
            url: '/api/DeviceVariable/Get',
            method: 'get',
           params,
        }
    )
};
export const editDeviceVariable = (params: any) => {
    return request(
        {
            url: '/api/DeviceVariable/Update',
            method: 'post',
            data: params
        }
    )
};
export const removeDeviceVariable = (params: any) => {
    return request(
        {
            url: '/api/DeviceVariable/Delete',
            method: 'delete',
            params: params
        }
    )
};

